package com.csu.backmanagesys.Service.impl;

import com.csu.backmanagesys.Domain.Account;
import com.csu.backmanagesys.Mapper.AccountMapper;
import com.csu.backmanagesys.Service.AccountService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class AccountServiceImpl implements AccountService {

    @Resource
    private AccountMapper accountMapper;

    @Override
    public List<Account> selectAccount() {
        return accountMapper.selectAccount();
    }

    @Override
    public List<Account> selectAccountById(String id){
        return accountMapper.selectAccountById(id);
    }

    @Override
    public List<Account> fuzzySelectAccount(String param) {
        return accountMapper.fuzzySelectAccount(param);
    }

    @Override
    public Account getAccountById(String id){
        return accountMapper.getAccountById(id);
    }

    @Override
    public Account selectAccountByPhone(String phone){
        return accountMapper.selectAccountByPhone(phone);
    }

    @Override
    public void updateAccount_password(String username , String password) { accountMapper.updateAccount_password(username,password);}

    @Override
    public void updateAccount_information(Account accout) {
        accountMapper.updateAccount_information(accout);
    }

    @Override
    public Object selectAccountId() {
        return null;
    }
}
